﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DMS.Logic;

namespace WebUI.library
{
    public partial class list : System.Web.UI.Page
    {
 
        protected void Page_Load(object sender, EventArgs e)
        {
            loadGV();
        }
        void loadGV()
        {
            GV.DataSource = BL.getInstance().getAllDocumentLibrary();
            GV.DataBind();
        }

        protected void GV_RowDeleting(object sender, GridViewDeleteEventArgs e)
        {
            int id = (int)GV.DataKeys[e.RowIndex].Value;
            BL.getInstance().deleteDocumentLibrary(id);
            Response.Redirect(Request.RawUrl);
        }
    }
}
